<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改检测机构检测资质')" />
	<th:block th:include="include :: datetimepicker-css" />
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: datetimepicker-js" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-tJcJcjgZz-edit" th:object="${tJcJcjgZz}">
            <input id="jcjgZzId" name="jcjgZzId" th:field="*{jcjgZzId}"  type="hidden">
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">监测机构id：</label>
				<div class="col-sm-8">
					<input id="jcjgId" name="jcjgId" th:field="*{jcjgId}" class="form-control" type="text">
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">资质等级：</label>
						<div class="col-sm-8">
							<input id="qualification" name="qualification" th:field="*{qualification}" class="form-control" type="text">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">资质编号：</label>
						<div class="col-sm-8">
							<input id="lssuingNumber" name="lssuingNumber" th:field="*{lssuingNumber}" class="form-control" type="text">
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">发证单位：</label>
						<div class="col-sm-8">
							<input id="lssuingUnit" name="lssuingUnit" th:field="*{lssuingUnit}" class="form-control" type="text">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">资质有效期起：</label>
						<div class="col-sm-8">
							<input id="periodStart" name="periodStart" th:value="${#dates.format(tJcJcjgZz.periodStart,'yyyy-MM-dd')}" class="form-control" type="text">
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">资质有效期止：</label>
						<div class="col-sm-8">
							<input id="periodEnd" name="periodEnd" th:value="${#dates.format(tJcJcjgZz.periodEnd,'yyyy-MM-dd')}" class="form-control" type="text">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">备注：</label>
						<div class="col-sm-8">
							<input id="remarks" name="remarks" th:field="*{remarks}" class="form-control" type="text">
						</div>
					</div>
				</div>
			</div>
		</form>
    </div>
	<div class="row">
		<div class="col-sm-offset-5 col-sm-10">
			<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
			<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
		</div>
	</div>
    <script type="text/javascript">
		var prefix = ctx + "system/tJcJcjgZz";
		$("#periodEnd").datetimepicker({
			format: "yyyy-mm-dd",
			minView: "month",
			autoclose: true
		});
		$("#periodStart").datetimepicker({
			format: "yyyy-mm-dd",
			minView: "month",
			autoclose: true
		});
		$("#form-tJcJcjgZz-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-tJcJcjgZz-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
